﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Owin.FileSystems;
using Owin;
using Microsoft.Owin.StaticFiles;
using System.Web.Http;

namespace Sustainalytics.ClientWebsites.Service
{
    public class Startup
    {
        public void Configuration(IAppBuilder builder)
        {
            var options = new FileServerOptions
            {
                EnableDirectoryBrowsing = false,
                FileSystem = new PhysicalFileSystem(@"website")
            };
            builder.UseFileServer(options);

            var config = new HttpConfiguration();

            WebApiConfig.Register(config);
            config.Formatters.XmlFormatter.SupportedMediaTypes.Clear();
            builder.UseWebApi(config);

            config.EnsureInitialized();
        }
    }
}
